package FirstStage.ObjectDetil;

public class HashCode {
    public static void main(String[] args) {
        A a1 =new A();
        B b1 =new B();
        // 如果两个引用指向的是同一个对象，则哈希值一样，否则是不一样的
        System.out.println("a1.hashcode= " +a1.hashCode());
        System.out.println("b1.hashcode= " +b1.hashCode());
        A a2 = a1;
        System.out.println("a2.hashcode= " +a2.hashCode());
    }
}
